<template>
  <div class="homebanner ">
    <van-swipe :stop-propagation="false" class="my-swipe bottom_shadow" :autoplay="2000" indicator-color="white">
      <van-swipe-item v-for="(item) in datas" :key="item.id" @click="bannerItemC(item)">
        <img :src="item.img" @load="imgLoad" alt />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>

export default {
  name: "HomeBanner",
  props: {
    datas: {
      type: Array
    }
  },
  data() {
    return {
      
    };
  },
  computed: {},
  methods: {
    bannerItemC(item) {
      
      this.$router.push(`/banner/${item.id}`);
      
    },
    imgLoad(){
      this.$bus.$emit('imgLoad')
      
    }
  },
  created() {},
  beforeDestroy() {

    
  }
};
</script>

<style lang="less" scoped>

img {
  width: 100%;
}

</style>
